import random
num = random.randint(a=1,b=10)
guess_num = int(input("请输入你要猜的数字："))

guess_num == num;
if guess_num ==num:
    print("恭喜，第一次就猜中了")
else:
    if guess_num > num:
        print("你猜的数字大了")
    else:
        print("你猜的数字小了")
    guess_num = int(input("再次输入你猜的数字："))
    if guess_num == num:
        print("恭喜，第二次猜对了")
    else:
        if guess_num > num:
            print("你猜的数大了")
        else:
            print("你猜的数小了")
        guess_num = int(input("最后一次输入你猜的数:"))
    if guess_num == num:
        print("最后一次猜对了")
    else:
        print("三次机会用完了")




